package carol.pvp.analyzer.java.pattern;

/**
 * 
 * @author carol
 *
 */
public class JavaCheckerPattern {

	/*Annotations(opt) package PackageName ;*/
	final public static String PACKAGE_PATTERN = "^\\s*"+"package\\s+";
	
	/*default, public, protected, private, abstract, static, final, strictfp*/
	final private static String CLASS_MODIFIERS = "(public\\s+|protected\\s+|private\\s+|abstract\\s+|static\\s+|final\\s+|strictfp\\s+)";
	
	/*ClassModifiers(opt) class Identifier TypeParameters(opt) Super(opt) Interfaces(opt) ClassBody*/
	final public static String CLASS_PATTERN = "^\\s*"+CLASS_MODIFIERS+"{0,3}"+"class\\s+";
	
	/*default, public, protected, private, abstract, static, final, strictfp, synchronized, native*/
	final private static String METHOD_MODIFIERS = "(public\\s+|protected\\s+|private\\s+|abstract\\s+|static\\s+|final\\s+|strictfp\\s+|synchronized\\s+|native\\s+)";
	
	/*MethodModifiers(opt) TypeParameters(opt) Result Identifier (FormalParameterList(opt)) Throws(opt)*/
	final public static String METHOD_PATTERN = "^\\s*"+METHOD_MODIFIERS+"{0,5}"+".+"+"(\\)\\s*|\\{\\s*|\\)\\s+throws\\s+\\w+\\s*)$";
	//final public static String METHOD_PATTERN = "(\\)\\s*|\\{\\s*|\\)\\s+throws\\s+\\w+\\s*)$";
	
}